<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        
        .active{
            font-size: 30px;
            color: green;
        }
        /* .current的类样式给带有.active的类名生效 */
        .active.current{
            background-color: pink;
        }
    </style>
</head>
<body>
    <div class="active current">我是一个div</div>
    <p class="active">我是一个p</p>
    <div class="current">我是一个div</div>
</body>
</html>